<template>
    <div id="app">
      <el-form ref="add-salePlan" :model="salePlan" label-width="100px">
        <el-form-item label="销售计划名称">
          <el-input v-model="salePlan.title" placeholder="请输入名称"></el-input>
        </el-form-item>
        <el-form-item label="描述">
          <el-input v-model="salePlan.description"  type="textarea" rows="5"></el-input>
        </el-form-item>

        <el-form-item label="执行情况">
          <el-input v-model="salePlan.execution"  type="textarea" rows="5"></el-input>
        </el-form-item>

        <el-form-item label="结果描述">
          <el-input v-model="salePlan.executionDescription"  type="textarea" rows="5"></el-input>
        </el-form-item>


        <el-form-item>
          <el-button type="primary" @click="saveSalePlan()">提交</el-button>
        </el-form-item>
      </el-form>
    </div>
</template>

<script>
    export default {
      data(){
        return {
          salePlan:{}
        }
      },
      created(){
        this.salePlan.sid=this.$route.query.cid;
      },
      methods:{
        saveSalePlan(){
          //发出ajax请求
          this.axios.post("/salePlan/add",this.salePlan).then((resp)=>{
            this.$router.push("/saleChance/SalePlanList?cid="+this.$route.query.cid);
          })
        }
      }
    }
</script>


<style scoped>

</style>
